namespace Brjnk.GpxExplorer.Workspace.Searching
{
    using Brjnk.GpxExplorer.Computing;
    using Brjnk.GpxExplorer.ViewModel;

    /// <summary>
    /// </summary>
    public class SearchPositionResult : SearchResult
    {
        public SearchPositionResult(FindPositionResult result, object item, ISearchablePath foundIn)
        {
            this.OriginalResult = result;
            this.SearchedItem = item;
            this.FoundIn = foundIn;
        }

        public IPoint SearchedItemTyped
        {
            get { return base.SearchedItem as IPoint; }
        }

        public bool IsSearchRequest { get { return SearchedItem is SearchRequest; } }

        public bool IsWaypoint { get { return SearchedItem is WaypointVM; } }

        public bool IsPhoto { get { return SearchedItem is LocatedPhoto; } }
    }
}